package cake.dao;

import java.util.List;

import cake.entity.Cake;

public interface CakeDao {
  boolean addCake(Cake cake);
  boolean updateCake(Cake cake,int id);
  List<Cake> getAllCake();
  Cake getCakeByName(String name);
  Cake getCakeById(int id);
  List<Cake> getCakeByCategory(int cid, int pageNum, int pageSize); 
  List<Cake> getCakeByCategory(int cid, String title,int pageNum, int pageSize);
  int totalCakeByCategoryId(int cid);
  List<Cake> getCakeByCategoryId(int cid);int totalCakeByCategoryId(int cid,String title);
  List<Cake> getCakeByCategoryAndStatus(int cid, int pageNum, int pageSize);
  int totalCakeByCategoryIdAndStatus(int cid);}
